Field
In some aspects, the following relates to rendering, using ray tracing, two-dimensional representations of three-dimensional scenes composed of shapes.
Related Art
Rendering photo-realistic 2-D images from 3-D scene descriptions with ray tracing is well-known in the computer graphics arts. Ray tracing usually involves obtaining a scene description composed of geometric shapes, which describe surfaces of structures in the scene, and can be called primitives. A common primitive shape is a triangle. Objects can be composed of one or more such primitives.
The primitives can be associated with textures and other information that instructs a computer how light hitting that primitive should be affected by qualities of the primitive. In other words, a model of a physical environment is produced; the model may be designed to produce realistic results for conditions familiar to humans, or the model may be designed to achieve other results as desired. Ray tracing can produce such photo-realistic images, including realistic shadow and lighting effects, because ray tracing can model the physical behavior of light interacting with elements of a scene. However, ray tracing is also known to be computationally intensive, and at present, even a state of the art graphics workstation requires a substantial amount of time to render a complicated scene using ray tracing, and real-time high quality and resolution rendering with ray tracing is still difficult to achieve.
Generalizing, rendering a scene with ray tracing involves intersection testing a ray (specified by any of a number of processes) to identify a closest primitive intersected by the ray. Computer code and data are often associated with primitives, and such code and data can be called a shader for a particular primitive. Determining a closest primitive intersected for the ray causes the shader for the intersected primitive to run. The shader consumes memory and compute resources during execution, and can, among other actions, instantiate new rays to be intersection tested. The rays instantiated by the shader can be for different purposes. For example, some rays can be instantiated by a call to get diffuse lighting conditions at the intersection point, other rays can be instantiated to determine whether other primitives shadow the intersection point, still other rays can be instantiated based on materials properties such as subsurface scattering, reflection and refraction. Thus, the shading of one primitive intersection can cause generation of a number of rays that also must be intersection tested. Shader code may also perform a variety of other processing based on information obtained from intersection testing of rays that it emitted. Therefore, a shader that emitted rays to be intersection tested may need to remain resident in a memory, or otherwise occupy or consume processing resources while intersection testing of those rays completes.
For example, a method that can be used during scene rendering can involve receiving intersection testing results in temporal order, where these intersection testing results indicate intersections that may be shaded. Typically, each intersection testing result comprises an indication of a ray and an indication of primitive. These indications are reordered, from the temporal order in which the intersection testing results were received, so that their order of shading also is affected. The new order is determined by selectively prioritizing shading of intersection testing results whose indicated rays are associated with importance information indicating that their shading would emit fewer rays than rays from other intersection testing results available for shading. This method can be employed in a memory constrained condition.
A complex scene can have hundreds of thousands, or even millions of primitives. Therefore, intersection testing of rays can be computationally expensive, even with various methodologies for accelerating or otherwise increasing the efficiency of that intersection testing (e.g., using an acceleration structure hierarchy, such as a k-d tree).
Further approaches for managing the computational loads of shading and intersection testing remain desirable, in order to further the usage of ray tracing in fields such as rendering of 3-D scenes into 2-D representations.